package org.lisen.quartzjdbc.scheduler;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author laughing
 * @date 2020/9/29
 * @site https://www.lisen.org
 */
public class PrintService implements Job {

    private final Logger logger = LoggerFactory.getLogger(PrintService.class);

    /**
     * 执行
     * @param jobExecutionContext
     * @throws JobExecutionException
     */
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        logger.info(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
    }
}
